<!--%import("filter/fix_attendance_data.xml")-->
<!--%import("css/cal_black.css")-->

<form action="./" method="post" onsubmit="return procFilter(this, fix_attendance_data);" id="fixAttendanceData">
<input type="hidden" name="selected_date" value="" />
<input type="hidden" name="member_srl" value ="" />
<input type="hidden" name="count" value ="" />
</form>
<table cellspacing="0" class="personalTable">
<thead>
    <tr>
        <th class="sunday center same_height" >{$lang->attend_week_name['sun']}</th>
        <th class="center same_height" >{$lang->attend_week_name['mon']}</th>
        <th class="center same_height" >{$lang->attend_week_name['tue']}</th>
        <th class="center same_height" >{$lang->attend_week_name['wed']}</th>
        <th class="center same_height" >{$lang->attend_week_name['thu']}</th>
        <th class="center same_height" >{$lang->attend_week_name['fri']}</th>
        <th class="saturday center same_height">{$lang->attend_week_name['sat']}</th>
    </tr>
    </thead>
    <tbody>
    {@$_day=1}
    {@$j=0}
    <!--@while($_day <= $admin_date_info->day_max)-->
        <!--@if($j % 7 == 0)-->
            <tr>
        <!--@end-->
        <!--@while($j < $admin_date_info->week_start)-->
            <td>&nbsp;</td>
        {@$j++}
        <!--@end-->
            <td>
                {@$check_date = sprintf("%s%s%02d",$admin_date_info->_year,$admin_date_info->_month,$_day)}
                {@$checked = $oAttendanceModel->getIsCheckedA($logged_info->member_srl, $check_date)}
                <!--@if(sprintf("%04d%02d%02d",$admin_date_info->_year,$admin_date_info->_month,$_day) == $selected_date)--><u><!--@end-->
                <!--@if($checked == 1)-->
                <a <!--@if($j%7==0)-->class="sunday"<!--@elseif($j%7==6)-->class="saturday"<!--@end--> href="{getUrl('document_srl','','selected_date',zDate(date('YmdHis',mktime(0,0,0,$admin_date_info->_month, $_day, $admin_date_info->_year)),"Ymd"))}">{$_day++}</a><!--@if(sprintf("%04d%02d%02d",$admin_date_info->_year,$admin_date_info->_month,$_day-1) == $selected_date)--></u><!--@end--><br/>
                <p class="check">O</p>
                <!--@elseif($checked >= 2)-->
                {$_day++}<br/>
                <a href="#fixAttendanceData" onclick="att_fix_attendance_data('{$logged_info->member_srl}','{$checked}','{$check_date}','{$lang->attend_fix_att}','{$logged_info->nick_name}');"><p class="check">?</p></a><!--@if($admin_date_info->_day == sprintf("%2d",$_day-1))--></u><!--@end-->
                <!--@else-->
                <a <!--@if($j%7==0)-->class="sunday"<!--@elseif($j%7==6)-->class="saturday"<!--@end--> href="{getUrl('document_srl','','selected_date',zDate(date('YmdHis',mktime(0,0,0,$admin_date_info->_month, $_day, $admin_date_info->_year)),"Ymd"))}">{$_day++}</a><!--@if(substr($selected_date,6,2) == sprintf("%02d",$_day-1))--></u><!--@end--><br/>
                <p class="check">X</p>
                <!--@end-->
            </td>
        <!--@if($_day-1 == $admin_date_info->day_max)-->
            <!--@while($j %7 < 6)-->
                <td>&nbsp;</td>
                {@$j++}
            <!--@end-->
        <!--@end-->
        <!--@if($j % 7 == 6)-->
            </tr>
        <!--@end-->
        {@$j++}
    <!--@end-->
    </tbody>
</table>
